#include<bits/stdc++.h>
using namespace std;

vector<int> ans(100);

void dfs(int x, int k, int cnt) {
	if(x == 0)	{
		for(int i = 0; i < cnt; i++)
			cout << ans[i] << " ";
		exit(0);
	}
	while(x < k)	dfs(x, k >> 1, cnt);
	ans[cnt] = k;
	dfs(x - k, k >> 1, cnt + 1);
}

signed main() {
    int x;
    cin >> x;
    if(x % 2)
        cout << "-1";
    else {
    	int k = 1 << 24;
    	while(x < k)	k >>= 1;
        dfs(x, k, 0);
    }
    return 0;
}

